/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyao.cloud.admin.api.dto.SysNumberDTO;
import com.fuyao.cloud.admin.api.entity.SysServerNumber;

import java.util.Map;

/**
 * 扶摇编码生成类
 *
 * @author liyue
 * @date 2021-11-15 09:56:07
 */
public interface SysServerNumberService extends IService<SysServerNumber> {

	/**
	 * 极据类型和编码获取编码 count值 。
	 *
	 * @param sysNumberDTO 参数对象
	 * @return count值 。
	 */
	Long getServerNumber(SysNumberDTO sysNumberDTO);

	/**
	 * 根据类型和编码+格式化位数 返回编码
	 *
	 * @param sysNumberDTO 参数对象
	 * @return 编码 xx.xxx0001
	 */
	String getServerNumberStr(SysNumberDTO sysNumberDTO);

	/**
	 * 根据 父级编码+类型和编码+格式化位数 返回编码
	 *
	 * @param sysNumberDTO 参数对象
	 * @return xx.xx.xxx00001
	 */
	String getServerNumberJoinParent(SysNumberDTO sysNumberDTO);

	/**
	 * 返回map集合，包含编码数值和编码。
	 * @param sysNumberDTO 编码对象
	 * @return map集合
	 */
	Map<String,String> getNumberMap(SysNumberDTO sysNumberDTO);


}
